import Vue from 'vue'

let server = process.env.VUE_APP_RESTAURANTPCSERVICE;
let getAllDetailUrl = '/goodorderdetail/getorderdetail';
let getGoodOrderUrl = '/goodorder/getgoodorder';
let updateGoodOrderUrl = '/goodorder/updategoodorder';
let insertPointDetailUrl = '/pointdetail/insertPointDetail';

export default{
	insertPointDetailService: function(paramsObj,callBack){
		Vue.axios.post(`${server}${insertPointDetailUrl}`, paramsObj).then(res => {
			callBack(res.data);
		})
	},
	getAllDetailService: function(paramsObj,callBack){
		Vue.axios.get(`${server}${getAllDetailUrl}/${paramsObj}`).then(res => {
			callBack(res.data);
		})
	},
	getGoodOrderService: function(paramsObj,callBack){
		Vue.axios.get(`${server}${getGoodOrderUrl}/${paramsObj}`).then(res => {
			callBack(res.data);
		})
	},
	updateGoodOrderService: function(paramsObj,callBack){
		Vue.axios.post(`${server}${updateGoodOrderUrl}`, paramsObj).then(res => {
			callBack(res.data);
		})
	},
}